Skip to content

Fix for BA sync#189

Merged
jmgasper merged 3 commits into
masterfrom
dev
Jun 16, 2026
Merged

Fix for BA sync#189
jmgasper merged 3 commits into
masterfrom
dev

Conversation

@jmgasper

Copy link
Copy Markdown
Collaborator

jmgasper added 3 commits May 21, 2026 14:03
What was broken
Finance rebuilt challenge billing-account lock and consume totals from payment.total_amount. Some challenge payment rows can carry a fee-inclusive total, so the billing ledger could store member payments with the challenge fee already included and then apply markup again.

Root cause
The previous UI and billing API fixes corrected how existing ledger rows were displayed, but the finance synchronization path could still write or rebuild challenge billing rows from fee-inclusive payment totals instead of the member-payment subtotal.

What was changed
Added a shared finance helper that resolves the challenge member-payment amount from gross_amount with total_amount as a fallback. Updated new winning creation sync and wallet-admin resync paths to use that member subtotal when recalculating challenge billing-account rows.

Any added/updated tests
Updated WinningsService and AdminService coverage so fee-inclusive total_amount rows still sync billing accounts from gross_amount member payments.
PM-5043: Use gross challenge payments for BA sync
@jmgasper
jmgasper merged commit 873033d into master Jun 16, 2026
10 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant